import Vue from 'vue'
// 引入Vuex
import Vuex from 'vuex'
// 使用Vuex
Vue.use(Vuex)

// 准备actions --- 用于响应组件中的动作
const actions = {}
// 准备mutation --- 用于操作数据 (state)
const mutations = {}
// 准备state --- 用于储存数据
const state = {
    menuList: [
        {
            title: "审核",
            icon: "el-icon-s-claim",
            name: "examine",
            children: [
                {
                    name: "examine_event",
                    title: "活动审核",
                    icon: "el-icon-s-flag",
                    path: "/examine_event",
                    component: "examine_event"
                },
                {
                    name: "examine_organization",
                    title: "社团审核",
                    icon: "el-icon-s-cooperation",
                    path: "/examine_organization",
                    component: "examine_organization"
                },
            ]
        },
        {
            title: "系统管理",
            icon: "el-icon-s-tools",
            name: "sys",
            children: [
                {
                    name: "user",
                    title: "用户",
                    icon: "el-icon-user-solid",
                    path: "/user",
                    component: "t_wxUserInfo"
                },
                {
                    name: "organization",
                    title: "社团",
                    icon: "el-icon-s-cooperation",
                    path: "/organization",
                    component: "organization"
                },
                {
                    name: "event",
                    title: "活动",
                    icon: "el-icon-s-flag",
                    path: "/event",
                    component: "event"
                },
            ]
        }
    ],
    isGet: 0,
}
// 准备getter --- 用于将state中的数据进行加工返回
const getters = {}
// 创建并暴露store
export default {
    actions,
    mutations,
    state,
    getters,
}
